package com.michau.testitas.common.model.definition;

import javax.persistence.DiscriminatorValue;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Transient;
import java.awt.image.BufferedImage;

/**
 * User: michau
 * Date: 1/9/13
 * Time: 8:54 PM
 */
@DiscriminatorValue("image")
public class ImageContent extends Content {

    public enum SupportedFormats{
        JPG,
        PNG,
        BMP,
        GIF
    }

    @Enumerated(EnumType.STRING)
    private SupportedFormats format;

    @Transient
    private BufferedImage image;

    public SupportedFormats getFormat() {
        return format;
    }

    public void setFormat(SupportedFormats format) {
        this.format = format;
    }

    public BufferedImage getImage(){
        return image;
    }

    public void setImage(BufferedImage image){
        this.image = image;
    }
}
